<?php header("Location 404.htm");Die();/*
<code>
//*/
	if(ereg('^:([^ ]+).*!op[ ]?([^ ]+)?[ ]?([^ ]+)?',$GLOBALS['IRC']->GetLastLine(),$tmp))
	{
	  if($GLOBALS['Users']->MaskToUser($tmp[1])==false) $GLOBALS['IRC']->Reply('You are not registered in bot!');
	  else
	  {
		$user=$GLOBALS['Users']->MaskToUser($tmp[1]);
	  	if($tmp[2]=='')unset($tmp[2]);if($tmp[3]=='')unset($tmp[3]);
	  	print_r($tmp);
		switch(count($tmp)-2)	// first is hostmask, second $tmp[0]
		{
			case 0: // user want to op himself in actual channel
					if ($GLOBALS['IRC']->GetReplyType()!=IRC_Reply_Channel)
					  $GLOBALS['IRC']->Reply('Missing parameter.. use help');
					else
					{	
						ereg('^.*(#[^ ]+).*',$GLOBALS['IRC']->GetLastLine(),$tmp2);
						if($GLOBALS['Users']->HasFlag($user,array('o','m','n'),$tmp2[1]))
							{
							  ereg('([^!]+)![^ ]+',$tmp[1],$tmp3);
							  $GLOBALS['IRC']->Op($tmp3[1],$tmp2[1]);
							  $this->AddTrigger('not_op',"^:[^ ]+ ".ERR_CHANOPRIVSNEEDED." .*");
							  $this->Data['Reply_path']=$GLOBALS['IRC']->GetReplyPath();
							}
						else $GLOBALS['IRC']->Reply('You have flags for this command!');
					}
					break;
			case 1: // user want to op someone in actual channel
					if ($GLOBALS['IRC']->GetReplyType()!=IRC_Reply_Channel)
					  $GLOBALS['IRC']->Reply('Missing parameter.. use help');
					else
					{
						ereg('^.*(#[^ ]+).*',$GLOBALS['IRC']->GetLastLine(),$tmp2);
						if (!$GLOBALS['IRC']->IsJoinedIn($tmp[2],$tmp2[1]))
							$GLOBALS['IRC']->Reply('User '.$tmp[2].' not found');	
						else
						{
							if($GLOBALS['Users']->HasFlag($user,array('o','m','n'),$tmp2[1]))
							{
							  $GLOBALS['IRC']->Op($tmp[2],$tmp2[1]);
							  $this->AddTrigger('not_op',"^:[^ ]+ ".ERR_CHANOPRIVSNEEDED." .*");
							  $this->Data['Reply_path']=$GLOBALS['IRC']->GetReplyPath();
							}
							else $GLOBALS['IRC']->Reply('You have flags for this command!');
						}
					}
					break;
			case 2: // op someone in some channel
					if (!$GLOBALS['IRC']->JoinedIn($tmp[3]))
						$GLOBALS['IRC']->Reply('I\'m not in '.$tmp[3]);
					else
					{
						if (!$GLOBALS['IRC']->IsJoinedIn($tmp[2],$tmp[3]))
							$GLOBALS['IRC']->Reply('User '.$tmp[2].' not found');	
						else
						{
							if($GLOBALS['Users']->HasFlag($user,array('o','m','n'),$tmp[3]))
							{
							$GLOBALS['IRC']->Op($tmp[2],$tmp[3]);
							$this->AddTrigger('not_op',"^:[^ ]+ ".ERR_CHANOPRIVSNEEDED." .*");
							$this->Data['Reply_path']=$GLOBALS['IRC']->GetReplyPath();
							}
							else $GLOBALS['IRC']->Reply('You have flags for this command!');
						}
					}
					break;
		}
	  }
	}
	
///*
</code>
<code not_op>
	eregi('^:[^ ]+ '.ERR_CHANOPRIVSNEEDED.' [^ ]+ ([^ ]+)',$GLOBALS['IRC']->GetLastLine(),$tmp);
	$GLOBALS['IRC']->Reply('I\'m not channel operator in '.$tmp[1],$this->Data['Reply_path']);
	$this->DestroyAllTriggers();
</code>
*/?>